Systems and methods for intelligent control related to TRIAC dimmers

ABSTRACT

System controller and method for a lighting system. The system controller includes a first controller terminal configured to receive a first signal, and a second controller terminal configured to output a second signal to a diver component. The driver component is configured to receive a first current and provide one or more drive currents to one or more light emitting diodes in response to the second signal. Additionally, the system controller is configured to process information associated with the first signal, determine a first time period for the first signal to increase from a first threshold to a second threshold, and determine a second time period for the first signal to decrease from the second threshold to the first threshold.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/263,080, filed Sep. 12, 2016, which is a continuation of U.S. patentapplication Ser. No. 14/593,734, filed Jan. 9, 2015, which claimspriority to Chinese Patent Application No. 201410172086.6, filed Apr.25, 2014, all of the above-referenced applications being commonlyassigned and incorporated by reference herein for all purposes.

Additionally, this application is related to U.S. patent applicationSer. No. 14/451,656, which is incorporated by reference herein for allpurposes.

BACKGROUND OF THE INVENTION

Certain embodiments of the present invention are directed to integratedcircuits. More particularly, some embodiments of the invention provide asystem and method for intelligent control related to TRIAC dimmers.Merely by way of example, some embodiments of the invention have beenapplied to driving light emitting diodes (LEDs). But it would berecognized that the invention has a much broader range of applicability.

A conventional lighting system may include or may not include a TRIACdimmer that is a dimmer including a Triode for Alternating Current(TRIAC). For example, the TRIAC dimmer is either a leading-edge TRIACdimmer or a trailing-edge TRIAC dimmer. Often, the leading-edge TRIACdimmer and the trailing-edge TRIAC dimmer are configured to receive analternating-current (AC) input voltage, process the AC input voltage byclipping part of the waveform of the AC input voltage, and generate anvoltage that is then received by a rectifier (e.g., a full waverectifying bridge) in order to generate a rectified output voltage.

FIG. 1 shows certain conventional timing diagrams for a leading-edgeTRIAC dimmer and a trailing-edge TRIAC dimmer. The waveforms 110, 120,and 130 are merely examples. Each of the waveforms 110, 120, and 130represents a rectified output voltage as a function of time that isgenerated by a rectifier. For the waveform 110, the rectifier receivesan AC input voltage without any processing by a TRIAC dimmer. For thewaveform 120, an AC input voltage is received by a leading-edge TRIACdimmer, and the voltage generated by the leading-edge TRIAC dimmer isreceived by the rectifier, which then generates the rectified outputvoltage. For the waveform 130, an AC input voltage is received by atrailing-edge TRIAC dimmer, and the voltage generated by thetrailing-edge TRIAC dimmer is received by the rectifier, which thengenerates the rectified output voltage.

As shown by the waveform 110, each cycle of the rectified output voltagehas, for example, a phase angel (e.g., φ) that changes from 0° to 180°and then from 180° to 360°. As shown by the waveform 120, theleading-edge TRIAC dimmer usually processes the AC input voltage byclipping part of the waveform that corresponds to the phase angelstarting at 0° or starting at 180°. As shown by the waveform 130, thetrailing-edge TRIAC dimmer often processes the AC input voltage byclipping part of the waveform that corresponds to the phase angel endingat 180° or ending at 360°.

Various conventional technologies have been used to detect whether ornot a TRIAC dimmer has been included in a lighting system, and if aTRIAC dimmer is detected to be included in the lighting system, whetherthe TRIAC dimmer is a leading-edge TRIAC dimmer or a trailing-edge TRIACdimmer. In one conventional technology, a rectified output voltagegenerated by a rectifier is compared with a threshold voltage V_(th_on)in order to determine a turn-on time period T_(on). If the turn-on timeperiod T_(on) is equal to the duration of a half cycle of the AC inputvoltage, no TRIAC dimmer is determined to be included in the lightingsystem; if the turn-on time period T_(on) is smaller than the durationof a half cycle of the AC input voltage, a TRIAC dimmer is determined tobe included in the lighting system. If a TRIAC dimmer is determined tobe included in the lighting system, a turn-on voltage V_(on) is comparedwith the threshold voltage V_(th_on). If the turn-on voltage V_(on) islarger than the threshold voltage V_(th_on), the TRIAC dimmer isdetermined to be a leading-edge TRIAC dimmer; if the turn-on voltageV_(on) is smaller than the threshold voltage V_(th_on), the TRIAC dimmeris determined to be a trailing-edge TRIAC dimmer.

In another conventional technology, a rate of change of a rectifiedoutput voltage is used. The rectified output voltage is generated by arectifier, and its rate of change is determined by quickly sampling therectified voltage twice. Depending on the phase angles at which thesetwo sampling actions are taken, a predetermined range for the rate ofchange is used. If the rate of change falls within this predeterminedrange, no TRIAC dimmer is determined to be included in the lightingsystem; if the rate of change falls outside this predetermined range, aTRIAC dimmer is determined to be included in the lighting system. If aTRIAC dimmer is determined to be included in the lighting system,whether the rate of change is positive or negative is used to determinethe type of the TRIAC dimmer. If the rate of change is positive, theTRIAC dimmer is determined to be a leading-edge TRIAC dimmer; if therate of change is negative, the TRIAC dimmer is determined to be atrailing-edge TRIAC dimmer.

If a conventional lighting system includes a TRIAC dimmer and lightemitting diodes (LEDs), the light emitting diodes may flicker if thecurrent that flows through the TRIAC dimmer falls below a holdingcurrent that is, for example, required by the TRIAC dimmer. As anexample, if the current that flows through the TRIAC dimmer falls belowthe holding current, the TRIAC dimmer may turn on and off repeatedly,thus causing the LEDs to flicker. As another example, the various TRIACdimmers made by different manufacturers have different holding currentsranging from 5 mA to 50 mA.

In order to solve this flickering problem, certain conventionaltechnology uses a bleeder for the conventional lighting system. FIG. 2is a simplified diagram of a conventional lighting system that includesa bleeder. As shown, the lighting system 200 includes a TRIAC dimmer210, a rectifier 220, a bleeder 230, an LED driver 240, and LEDs 250.The TRIAC dimmer 210 receives an AC input voltage 214 (e.g., V_(line))and generate a voltage 212. The voltage 212 is received by the rectifier220 (e.g., a full wave rectifying bridge), which then generates arectified output voltage 222 and a rectified output current 260. Therectified output current 260 is equal to the current that flows throughthe TRIAC dimmer 210, and is also equal to the sum of currents 232 and242. The current 232 is received by the bleeder 230, and the current 242is received by the LED driver 240. The magnitude of the current 232 mayhave a fixed magnitude or may change between two different predeterminedmagnitudes.

FIG. 3 is a simplified diagram showing certain conventional componentsof the bleeder as part of the lighting system 200 as shown in FIG. 2.The bleeder 230 includes a current detection circuit 310, a logiccontrol circuit 320, and current sinks 330 and 340. As shown in FIG. 3,a current 350 is configured to follow through a resistor 360 in order togenerate a voltage 370 (e.g., V₁). The current 350 equals the rectifiedoutput current 260 in magnitude, and the voltage 370 represents themagnitude of the current 350. The voltage 370 is divided by resistors362 and 364 to generate a voltage 372 (e.g., V₂). The voltage 372 isreceived by the current detection circuit 310, which sends detectedinformation to the logic control circuit 320. In response, the logiccontrol circuit 320 either enables the current sink 330 with a controlsignal 332 or enables the current sink 340 with a control signal 342.The control signals 332 and 342 are generated by the logic controlcircuit 320 and are complementary to each other. If the current sink 330is enabled, the current 232 received by the bleeder 230 is equal to acurrent 334; if the current sink 340 is enabled, the current 232 isequal to a current 344. The current 344 is larger than the current 334in magnitude.

Returning to FIG. 2, the voltage 212 generated by the TRIAC dimmer 210may have waveforms that are not symmetric between a positive half cycleand a negative half cycle of the AC input voltage 214. This lack ofsymmetry can cause the current that flows through the LEDs 250 to varywith time; therefore, the LEDs 250 can flicker at a fixed frequency(e.g., 50 Hz or 60 Hz). Also, according to certain conventionaltechnology, a single TRIAC dimmer (e.g., the TRIAC dimmer 210) and asingle rectifier (e.g., the rectifier 220) are used to support multiplelamp subsystems that are connected in parallel. Each lamp subsystemincludes a bleeder (e.g., the bleeder 230), an LED driver (e.g., the LEDdriver 240), and LEDs (e.g., LEDs 250), and is associated with arectified output current (e.g., the rectified output current 260) thatprovides currents to the bleeder (e.g., the bleeder 230) and the LEDdriver (e.g., the LED driver 240). The sum of these rectified outputcurrents of multiple lamp subsystems is equal to the current that flowsthrough the TRIAC dimmer (e.g., the TRIAC dimmer 210). Often, eachrectified output current for each lamp subsystem is made larger than theholding current of the TRIAC dimmer (e.g., the TRIAC dimmer 210); hencethe sum of these rectified output currents become much larger than theholding current of the TRIAC dimmer (e.g., the TRIAC dimmer 210),wasting of energy and thus lowering efficiency of the system.

Hence it is highly desirable to improve the techniques of dimmingcontrol.

BRIEF SUMMARY OF THE INVENTION

Certain embodiments of the present invention are directed to integratedcircuits. More particularly, some embodiments of the invention provide asystem and method for intelligent control related to TRIAC dimmers.Merely by way of example, some embodiments of the invention have beenapplied to driving light emitting diodes (LEDs). But it would berecognized that the invention has a much broader range of applicability.

According to one embodiment, a system controller for a lighting systemincludes a first controller terminal configured to receive a firstsignal, and a second controller terminal configured to output a secondsignal to a diver component. The driver component is configured toreceive a first current and provide one or more drive currents to one ormore light emitting diodes in response to the second signal.Additionally, the system controller is configured to process informationassociated with the first signal, determine a first time period for thefirst signal to increase from a first threshold to a second threshold,and determine a second time period for the first signal to decrease fromthe second threshold to the first threshold. Moreover, the systemcontroller is further configured to, in response to the second timeperiod minus the first time period being larger than a predeterminedpositive value, determine the first signal to be associate with aleading-edge TRIAC dimmer, and in response to the first time periodminus the second time period being larger than the predeterminedpositive value, determine the first signal to be associate with atrailing-edge TRIAC dimmer. Also, the system controller is furtherconfigured to, in response to an absolute value of the first time periodminus the second time period being smaller than the predeterminedpositive value, determine the first signal not to be associated with anyTRIAC dimmer.

According to another embodiment, a system controller for a lightingsystem includes a first controller terminal configured to receive afirst signal associated with a TRIAC dimmer, and a second controllerterminal configured to output a second signal to a current sink. Thecurrent sink is configured to receive a first current in response to thesecond signal. Additionally, the system controller includes a thirdcontroller terminal configured to output a third signal to a drivercomponent. The driver component is configured to receive a secondcurrent and provide one or more drive currents to one or more lightemitting diodes in response to the third signal. Moreover, the systemcontroller includes a fourth controller terminal configured to receive afourth signal. The fourth signal is related to a third current thatflows through the TRIAC dimmer. Also, the system controller isconfigured to process information associated with the first signal, anddetermine the TRIAC dimmer is turned on at a first time based at leastin part on the first signal. Additionally, the system controller isconfigured to, after the first time, with a first delay, decrease a dutycycle of the second signal from a first predetermined value until thefourth signal indicates that the TRIAC dimmer is turned off at a secondtime, and in response to the fourth signal indicating that the TRIACdimmer is turned off at the second time, set a first threshold for thefourth signal, the first threshold being related to a holding current ofthe TRIAC dimmer. Moreover, the system controller is further configuredto process information associated with the first signal, and determinethe TRIAC dimmer is turned on at a third time based at least in part onthe first signal. Also, the system controller is further configured to,after the third time, with a second delay, change the second signal froma first logic level to a second logic level and keep the second signalat the second logic level until a fourth time, and at the fourth time,change the second signal to a modulation signal to regulate the fourthsignal at a second threshold in order to keep the fourth signal largerthan the first threshold and keep the third current larger than theholding current of the TRIAC dimmer. The second threshold is larger thanthe first threshold, and the modulation signal changes between the firstlogic level and the second logic level.

According to yet another embodiment, a method for a lighting systemincludes receiving a first signal, processing information associatedwith the first signal, determining a first time period for the firstsignal to increase from a first threshold to a second threshold,determining a second time period for the first signal to decrease fromthe second threshold to the first threshold, and processing informationassociated with the first time period and the second time period.Additionally, the method includes, in response to the second time periodminus the first time period being larger than a predetermined positivevalue, determining the first signal to be associate with a leading-edgeTRIAC dimmer, and in response to the first time period minus the secondtime period being larger than the predetermined positive value,determining the first signal to be associate with a trailing-edge TRIACdimmer. Moreover, the method includes, in response to an absolute valueof the first time period minus the second time period being smaller thanthe predetermined positive value, determining the first signal not to beassociated with any TRIAC dimmer.

According to yet another embodiment, a method for a lighting systemincludes receiving a first signal associated with a TRIAC dimmer,receiving a second signal related to a first current that flows throughthe TRIAC dimmer, processing information associated with the firstsignal, and determining the TRIAC dimmer is turned on at a first timebased at least in part on the first signal. Additionally, the methodincludes, after the first time, with a first delay, decreasing a dutycycle of a third signal from a first predetermined value until thesecond signal indicates that the TRIAC dimmer is turned off at a secondtime, and setting a first threshold for the second signal in response tothe second signal indicating that the TRIAC dimmer is turned off at thesecond time, the first threshold being related to a holding current ofthe TRIAC dimmer. Moreover, the method includes determining that theTRIAC dimmer is turned on at a third time based at least in part on thefirst signal, and after the third time, with a second delay, changingthe third signal from a first logic level to a second logic level andkeep the third signal at the second logic level until a fourth time.Also, the method includes at the fourth time, changing the third signalto a modulation signal to regulate the second signal at a secondthreshold in order to keep the second signal larger than the firstthreshold and keep the first current larger than the holding current ofthe TRIAC dimmer. The second threshold is larger than the firstthreshold, and the modulation signal changes between the first logiclevel and the second logic level.

Depending upon embodiment, one or more benefits may be achieved. Thesebenefits and various additional objects, features and advantages of thepresent invention can be fully appreciated with reference to thedetailed description and accompanying drawings that follow.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows certain conventional timing diagrams for a leading-edgeTRIAC dimmer and a trailing-edge TRIAC dimmer.

FIG. 2 is a simplified diagram of a conventional lighting system thatincludes a bleeder.

FIG. 3 is a simplified diagram showing certain conventional componentsof the bleeder as part of the lighting system as shown in FIG. 2.

FIG. 4 is a simplified diagram of a lighting system according to anembodiment of the present invention.

FIG. 5 shows certain timing diagrams for a processing component of asystem controller as part of the lighting system as shown in FIG. 4according to an embodiment of the present invention.

FIG. 6 shows certain timing diagrams for another processing component ofthe system controller as part of the lighting system as shown in FIG. 4if a TRIAC dimmer is includes in the lighting system and the TRIACdimmer is a leading-edge TRIAC dimmer according to an embodiment of thepresent invention.

FIG. 7 shows certain timing diagrams for yet another processingcomponent of the system controller as part of the lighting system asshown in FIG. 4 if a TRIAC dimmer is includes in the lighting system andthe TRIAC dimmer is a leading-edge TRIAC dimmer according to anembodiment of the present invention.

FIG. 8 is a simplified diagram of a lighting system that includesmultiple lamp subsystems according to an embodiment of the presentinvention.

FIG. 9 is a simplified diagram of a lighting system that includesmultiple lamp subsystems according to another embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

Certain embodiments of the present invention are directed to integratedcircuits. More particularly, some embodiments of the invention provide asystem and method for intelligent control related to TRIAC dimmers.Merely by way of example, some embodiments of the invention have beenapplied to driving light emitting diodes (LEDs). But it would berecognized that the invention has a much broader range of applicability.

As discussed earlier, various conventional technologies have been usedto detect whether or not a TRIAC dimmer has been included in a lightingsystem, and if a TRIAC dimmer is detected to be included in the lightingsystem, whether the TRIAC dimmer is a leading-edge TRIAC dimmer or atrailing-edge TRIAC dimmer. These conventional technologies have variousweaknesses.

In one conventional technology, a rectified output voltage generated bya rectifier is compared with a threshold voltage V_(th_on) in order todetermine a turn-on time period T_(on). This conventional technology,however, often cannot effectively distinguish the situation where noTRIAC dimmer is included in a lighting system from the situation where atrailing-edge TRIAC dimmer is included in a lighting system. In thesituation where a trailing-edge TRIAC dimmer is included in a lightingsystem, the voltage generated by the trailing-edge TRIAC dimmer afterthe dimmer is turned off decreases slowly to the threshold voltageV_(th_on) due to charging and/or discharging of one or more capacitors.This slow reduction of the voltage makes it difficult to compare theturn-on time period T_(on) and the duration of a half cycle of the ACinput voltage; hence the determination about whether a TRIAC dimmer hasbeen included in a lighting system and/or whether a trailing-edge TRIACdimmer has been included in a lighting system becomes unreliable.

In another conventional technology, a rate of change of a rectifiedoutput voltage is used. The rectified output voltage is generated by arectifier, and its rate of change is determined by quickly sampling therectified voltage twice. Hence this conventional technology needsreal-time fast calculation of rate of change between two successivelysampled rectified voltage values, and also needs storage of variouspredetermined ranges for the rate of change that correspond to variousphase angles at which these two sampling actions are taken. Suchcomputation and storage often impose significant demand on bit depth ofan analog-to-digital converter, computational capability of the system,and storage capacity of the system.

Additionally, referring to FIG. 2, the current 232 is received by thebleeder 230. As shown in FIG. 3, the magnitude of the current 232 canchange between two different predetermined magnitudes. The current 232equals the current 334 or the current 344, and the current 344 is largerthan the current 334 in magnitude. One weakness of this conventionaltechnology as shown in FIGS. 2 and 3 is that the currents 334 and 344each have a fixed magnitude. If the holding current of the TRIAC dimmer210 is higher than both the currents 334 and 344 in magnitude, the LEDs250 may flicker. If the holding current of the TRIAC dimmer 210 is lowerthan the current 344 but higher than the current 334 in magnitude,setting the current 232 equal to the current 334 may cause the LEDs 250to flicker, but setting the current 232 equal to the current 344 maywaster energy and thus lower efficiency of the system.

Moreover as discussed above, as shown in FIG. 2, the voltage 212generated by the TRIAC dimmer 210 may have waveforms that are notsymmetric between a positive half cycle and a negative half cycle of theAC input voltage 214. This lack of symmetry can cause the LEDs 250 toflicker at a fixed frequency (e.g., 50 Hz or 60 Hz). To resolve thisissue, two turn-on time periods for the waveforms can be detected inreal time. One of the two turn-on time periods corresponds to a positivehalf cycle, and the other of the two turn-on time periods corresponds toa negative half cycle that is neighboring to the positive half cycle.The waveform with the longer turn-on time period can, for example, bedelayed in providing a current to the LEDs 250, so that the currentreceived by the LEDs 250 is symmetric between the positive half cycleand the negative half cycle of the AC input voltage 214.

Additionally as discussed above, according to certain conventionaltechnology, a single TRIAC dimmer (e.g., the TRIAC dimmer 210) and asingle rectifier (e.g., the rectifier 220) are used to support multiplelamp subsystems that are connected in parallel. The sum of the rectifiedoutput currents of multiple lamp subsystems is equal to the current thatflows through the TRIAC dimmer (e.g., the TRIAC dimmer 210), and oftenis much larger than the holding current of the TRIAC dimmer (e.g., theTRIAC dimmer 210). Such large magnitude for the sum of the rectifiedoutput currents of multiple lamp subsystems not only lowers efficiencyof the system but also reduces the number of lamp subsystems that can besupported by the single TRIAC dimmer (e.g., the TRIAC dimmer 210) andthe single rectifier (e.g., the rectifier 220).

Certain embodiments of the present invention provide an intelligentmechanism to match and control a TRIAC dimmer. According to oneembodiment, the intelligent mechanism can reliably and automaticallydetect whether or not a TRIAC dimmer has been included in a lightingsystem, and if a TRIAC dimmer is detected to be included in the lightingsystem, whether the TRIAC dimmer is a leading-edge TRIAC dimmer or atrailing-edge TRIAC dimmer. For example, this reliable and automaticdetection can help to select appropriate method of dimming control inorder to improve energy efficiency of the system. According to anotherembodiment, the intelligent mechanism can automatically detect theholding current of the TRIAC dimmer, and use the closed-loop control toensure the current that flows through the TRIAC dimmer is not lower thanthe holding current of the TRIAC dimmer.

According to another embodiment, the intelligent mechanism can provideto LEDs a current that is symmetric between the positive half cycle andthe negative half cycle of an AC input voltage in order to preventflickering of the LEDs that can be caused by an asymmetric currentbetween the positive half cycle and the negative half cycle of the ACinput voltage. According to yet another embodiment, if multiple lampsubsystems are connected in parallel, the intelligent mechanism canoptimize each rectified output current for each lamp subsystem so thatthe sum of these rectified output currents is larger than but not toomuch larger than the holding current of the TRIAC dimmer in order toavoid flickering of LEDs that is caused by insufficient current flowingthrough the TRIAC dimmer. For example, such optimization of eachrectified output current can help improve energy efficiency of thesystem. In another example, such optimization of each rectified outputcurrent can increase the number of lamp subsystems that can be supportedby the system.

FIG. 4 is a simplified diagram of a lighting system according to anembodiment of the present invention. This diagram is merely an example,which should not unduly limit the scope of the claims. One of ordinaryskill in the art would recognize many variations, alternatives, andmodifications. The lighting system 400 includes a TRIAC dimmer 410, arectifier 420, a current sink 430, an LED driver 440, one or more LEDs450, resistors 470, 472, 474, 476, and 478, and a system controller 480.

Although the above has been shown using a selected group of componentsfor the lighting system 400, there can be many alternatives,modifications, and variations. In one embodiment, the TRIAC dimmer 410is removed from the lighting system 400 so that the lighting system 400does not include the TRIAC dimmer 410. In another embodiment, the TRIACdimmer 410 and the rectifier 420 are used to support multiple lampsubsystems that are connected in parallel.

For example, each lamp subsystem includes a system controller (e.g., thesystem controller 480), and resistors (e.g., the resistors 470, 472,474, 476, and 478), a current sink (e.g., the current sink 430), an LEDdriver (e.g., the LED driver 440), and one or more LEDs (e.g., the oneor more LEDs 450). In another example, each lamp subsystem includes arectifier (e.g., the rectifier 420), a system controller (e.g., thesystem controller 480), and resistors (e.g., the resistors 470, 472,474, 476, and 478), a current sink (e.g., the current sink 430), an LEDdriver (e.g., the LED driver 440), and one or more LEDs (e.g., the oneor more LEDs 450).

As shown in FIG. 4, the TRIAC dimmer 410 receives an AC input voltage414 (e.g., V_(line)) and generates a voltage 412. For example, thevoltage 412 is received by the rectifier 420 (e.g., a full waverectifying bridge), which generates a rectified output voltage 422 and arectified output current 460. In another example, the rectified outputvoltage 422 is received by a voltage divider including the resistors 470and 472, and the voltage divider outputs a voltage 424.

In one embodiment, a current 464 flows through the resistor 478, whichgenerates a voltage 466. For example, the current 464 is equal to therectified output current 460 in magnitude. In another example, thevoltage 466 is received by a voltage divider including the resistors 474and 476, and the voltage divider outputs a voltage 426. In yet anotherexample, the voltage 426 represents the rectified output current 460,which is equal to the current that flows through the TRIAC dimmer 410.

In another embodiment, the system controller 480 includes terminals 482,484, 486, and 488, and processing components 492, 494, and 496. Forexample, the terminal 482 (e.g., the terminal “V_DET”) receives thevoltage 424. In another example, the terminal 484 (e.g., the terminal“I_DET”) receives the voltage 426. In yet another example, the terminal486 (e.g., the terminal “BL”) outputs a control signal 434 (e.g., apulse-width-modulation signal or an analog voltage signal) to thecurrent sink 430. In yet another example, the terminal 488 (e.g., theterminal “DIM”) outputs a control signal 436 (e.g., apulse-width-modulation signal or an analog voltage signal) to the LEDdriver 440.

In yet another embodiment, the current sink 430, in response to thereceived signal 434, generates a current 432. For example, the signal434 is an analog voltage signal that controls the magnitude of thecurrent 432. In another example, the received signal 434 is a logicsignal, which changes between a logic high level and a logic low level.According to one embodiment, if the received signal 434 is at the logichigh level, the current sink 430 is turned on and the current 432 isequal to a predetermined current level that is larger than zero, and ifthe received signal 434 is at the logic low level, the current sink 430is turned off and the current 432 is equal to zero. According to anotherembodiment, the ratio between the time period when the received signal434 is at the logic high level and the time period when the receivedsignal 434 is at the logic low level is used by the current sink 430 todetermine the magnitude of the current 432. For example, if the ratiobecomes smaller, the current 432 also becomes smaller in magnitude.

In yet another embodiment, the LED driver 440 is configured to receivethe signal 436 and a current 442, and provide one or more drive currentsto drive the one or more LEDs 450 in response to the signal 436. Forexample, the control signal 436 is a logic signal. In another example,if the control signal 436 is at the logic high level, the LED driver inresponse receives the current 442 and provides one or more drivecurrents to drive the one or more LEDs 450. In yet another example, ifthe control signal 436 is at the logic low level, in response, thecurrent 442 is equal to zero and the one or more drive currents are alsoequal to zero. In yet another example, the control signal 436 is ananalog signal, and the LED driver in response receives the current 442and provides one or more drive currents to drive the one or more LEDs450, where the one or more drive currents are proportional to themagnitude of the control signal 436.

In yet another embodiment, the rectified output current 460 is equal tothe current that flows through the TRIAC dimmer 410, and is divided intoa current 462 received by the resistor 470, the current 432 generatedand received by the current sink 430, and the current 442 received bythe LED driver 440. For example, the rectified output current 460 isequal to the sum of the current 462, the current 432, and the current442. In another example, the rectified output current 460 is equal tothe current 464 that is received by the resistor 478 in magnitude.

In yet another embodiment, the processing component 492 is configured todetect whether or not the TRIAC dimmer 410 is included in the lightingsystem 400, and if the TRIAC dimmer 410 is detected to be included inthe lighting system 400, whether the TRIAC dimmer 410 is a leading-edgeTRIAC dimmer or a trailing-edge TRIAC dimmer. For example, theprocessing component 494 is configured to detect the holding current ofthe TRIAC dimmer 410, and use the closed-loop control to control thecurrent 432. In another example, the processing component 496 isconfigured to process the voltage 424 that has waveforms not symmetricbetween a positive half cycle and a negative half cycle of the AC inputvoltage 414, so that the system controller 480 can provide to the one ormore LEDs 450 a current that is symmetric between the positive halfcycle and the negative half cycle of the AC input voltage 414. In yetanother example, the processing component 492 is configured to, if thelighting system 400 includes the multiple lamp subsystems, control thecurrent 432 for the lamp subsystem to which the system controller 480belongs.

In yet another embodiment, the following processes (a), (b), and (c) areperformed sequentially:

(a) The system controller 480 uses the processing component 492 todetect whether or not the TRIAC dimmer 410 is included in the lightingsystem 400, and if the TRIAC dimmer 410 is detected to be included inthe lighting system 400, whether the TRIAC dimmer 410 is a leading-edgeTRIAC dimmer or a trailing-edge TRIAC dimmer;

(b) After the process (a) as described above, if the process (a)determines the TRIAC dimmer 410 is included in the lighting system 400,the system controller 480 uses the processing component 494 to detectthe holding current of the TRIAC dimmer 410; and

(c) After the processes (a) and (b) as described above, the process (c)is performed. During the process (c), the system controller 480 uses theprocessing component 494 to rely on the closed-loop control to controlthe current 432. Additionally, during the process (c), the systemcontroller 480 uses the processing component 496 to process the voltage424 that has waveforms not symmetric between a positive half cycle and anegative half cycle of the AC input voltage 414, so that the systemcontroller 480 can provide to the one or more LEDs 450 a current that issymmetric between the positive half cycle and the negative half cycle ofthe AC input voltage 414.

As discussed above and further emphasized here, FIG. 4 is merely anexample, which should not unduly limit the scope of the claims. One ofordinary skill in the art would recognize many variations, alternatives,and modifications. In one embodiment, the TRIAC dimmer 410 is removedfrom the lighting system 400, so that the lighting system 400 does notinclude the TRIAC dimmer 410 and the rectifier 420 directly receives theAC input voltage 414 and generates the rectified output voltage 422 andthe rectified output current 460. In another embodiment, some (e.g., oneor two) of the processing components 492, 494, and 496 are removed fromthe system controller 480.

As shown in FIG. 4, when the lighting system 400 is just turned on, theduty cycle of the signal 436 is equal to zero and hence the LED driver440 does not operate according to certain embodiments. In oneembodiment, immediately after the lighting system 400 is turned on, thesystem controller 480 uses the processing component 492 to first detectwhether or not the TRIAC dimmer 410 is included in the lighting system400, and if the TRIAC dimmer 410 is detected to be included in thelighting system 400, whether the TRIAC dimmer 410 is a leading-edgeTRIAC dimmer or a trailing-edge TRIAC dimmer. In another embodiment, theprocessing component 492 uses the received voltage 424 to detect arising time period (e.g., T_rise) during which the voltage 424 increasesfrom a lower threshold voltage (e.g., Vth_off) to a higher thresholdvoltage (e.g., Vth_on) and to detect a falling time period (e.g.,T_fall) during which the voltage 424 decreases from the higher thresholdvoltage (e.g., Vth_on) to the lower threshold voltage (e.g., Vth_off).For example, the processing component 492 compares the detected risingtime (e.g., T_rise) and the detected falling time (e.g., T_fall) todetermine whether or not the TRIAC dimmer 410 is included in thelighting system 400, and if the TRIAC dimmer 410 is determined to beincluded in the lighting system 400, whether the TRIAC dimmer 410 is aleading-edge TRIAC dimmer or a trailing-edge TRIAC dimmer.

FIG. 5 shows certain timing diagrams for the processing component 492 ofthe system controller 480 as part of the lighting system 400 as shown inFIG. 4 according to an embodiment of the present invention. Thesediagrams are merely examples, which should not unduly limit the scope ofthe claims. One of ordinary skill in the art would recognize manyvariations, alternatives, and modifications.

For example, the waveform 510 represents the voltage 424 as a functionof time during a half cycle of the AC input voltage 414 (e.g., V_(line))if the lighting system 400 does not include the TRIAC dimmer 410 so thatthe rectifier 420 directly receives the AC input voltage 414 andgenerates the rectified output voltage 422 and the rectified outputcurrent 460. In another example, the waveform 520 represents the voltage424 as a function of time during a half cycle of the AC input voltage414 (e.g., V_(line)) if the lighting system 400 includes the TRIACdimmer 410 and the TRIAC dimmer 410 is a leading-edge TRIAC dimmer. Inyet another example, the waveform 530 represents the voltage 424 as afunction of time during a half cycle of the AC input voltage 414 (e.g.,V_(line)) if the lighting system 400 includes the TRIAC dimmer 410 andthe TRIAC dimmer 410 is a trailing-edge TRIAC dimmer.

According to one embodiment, if the detected rising time (e.g., T_rise)is equal to or approximately equal to the detected falling time (e.g.,T_fall), the processing component 492 determines that the TRIAC dimmer410 is not included in the lighting system 400. According to anotherembodiment, if the detected rising time (e.g., T_rise) is smaller thanthe detected falling time (e.g., T_fall), the processing component 492determines that the TRIAC dimmer 410 is included in the lighting system400 and the TRIAC dimmer 410 is a leading-edge TRIAC dimmer. Forexample, for the leading-edge TRIAC dimmer, the voltage 424 increasesrapidly so that the detected rising time (e.g., T_rise) is approximatelyequal to zero. In another example, comparing the detected rising time(e.g., T_rise) and the detected falling time (e.g., T_fall) can reliablydetect whether or not the TRIAC dimmer 410 in the lighting system 400 isa leading-edge TRIAC dimmer. According to yet another embodiment, if thedetected rising time (e.g., T_rise) is larger than the detected fallingtime (e.g., T_fall), the processing component 492 determines that theTRIAC dimmer 410 is included in the lighting system 400 and the TRIACdimmer 410 is a trailing-edge TRIAC dimmer. For example, for thetrailing-edge TRIAC dimmer, the voltage 424 decreases slowly due tocharging and/or discharging of one or more capacitors so that thedetected falling time (e.g., T_fall) is not approximately equal to zero.In another example, comparing the detected rising time (e.g., T_rise)and the detected falling time (e.g., T_fall) can reliably distinguishthe situation where the TRIAC dimmer 410 is not included in the lightingsystem 400 from the situation where the TRIAC dimmer 410 in the lightingsystem 400 is a trailing-edge TRIAC dimmer.

According to certain embodiments, where ΔT is a predetermined threshold,

(a) if |T_rise−T_fall|≤ΔT, the processing component 492 determines thatthe TRIAC dimmer 410 is not included in the lighting system 400;

(b) if T_fall−T_rise>ΔT, the processing component 492 determines thatthe TRIAC dimmer 410 is included in the lighting system 400 and theTRIAC dimmer 410 is a leading-edge TRIAC dimmer; and

(c) if T_rise−T_fall>ΔT, the processing component 492 determines thatthe TRIAC dimmer 410 is included in the lighting system 400 and theTRIAC dimmer 410 is a trailing-edge TRIAC dimmer.

As shown in FIG. 4, after the processing component 492 has detected thatthe TRIAC dimmer 410 is included in the lighting system 400, and alsodetermined whether the TRIAC dimmer 410 is a leading-edge TRIAC dimmeror a trailing-edge TRIAC dimmer, the processing component 494 isconfigured to detect the holding current of the TRIAC dimmer 410, anduse the closed-loop control to control the current 432 according tocertain embodiments.

FIG. 6 shows certain timing diagrams for the processing component 494 ofthe system controller 480 as part of the lighting system 400 as shown inFIG. 4 if the TRIAC dimmer 410 is includes in the lighting system 400and the TRIAC dimmer 410 is a leading-edge TRIAC dimmer 410 according toan embodiment of the present invention. These diagrams are merelyexamples, which should not unduly limit the scope of the claims. One ofordinary skill in the art would recognize many variations, alternatives,and modifications. According to some embodiments, the waveform 610represents the voltage 424 as a function of time, the waveform 620represents the signal 434 as a function of time, the waveform 630represents the signal 436 as a function of time, and the waveform 640represents the voltage 426 as a function of time. According to certainembodiments, the processing component 494 is configured to detect theholding current of the TRIAC dimmer 410 before time t_(s), and use theclosed-loop control to control the current 432 after time t_(s).

In one embodiment, the processing component 494 receives the voltage424, and based on the received voltage 424, determines that the TRIACdimmer 410 is turned on at time t₁, as shown by the waveform 610. Inresponse, after time t₁, the system controller 480, including theprocessing component 494, generates the signal 434 so that the signal434 is at the maximum duty cycle immediately after time t₁, but the dutycycle of the signal 434 then decreases with time from the maximum dutycycle, according to some embodiments. For example, if the signal 434 isat the maximum duty cycle, the current 432 reaches a maximum magnitude.In another example, if the current 432 reaches a maximum magnitude, thecurrent 460 also reaches a maximum magnitude and the voltage 426 reachesa corresponding maximum magnitude at time t₂, as shown by the waveform640. In yet another example, the maximum magnitude of the current 460 ishigh than the holding current of the TRIAC dimmer 410, so that the TRIACdimmer 410 remains to be turned on at time t₂.

In yet another embodiment, if the duty cycle of the signal 434 decreaseswith time from the maximum duty cycle as shown by the waveform 610, thevoltage 426, which represents the current 460, also decreases with timefrom the maximum magnitude as shown by the waveform 640. For example, ifthe current 460, which is equal to the current flowing through the TRIACdimmer 410, becomes smaller than the holding current of the TRIAC dimmer410, the TRIAC dimmer 410 is turned off. In yet another example, inresponse to the TRIAC dimmer 410 being turned off, the decrease of thevoltage 424 becomes steeper at time t₃ as shown by the waveform 610 andthe decrease of the voltage 426 also becomes steeper at time t₃ as shownby the waveform 640. In yet another example, the processing component494 is configured to detect an abrupt change of slope at which thevoltage 426 decreases, and set a threshold magnitude V_(A) for thevoltage 426 based at least in part on the detected abrupt change ofslope.

In yet another embodiment, the threshold magnitude V_(A) of the voltage426 at time t₃ corresponds to the holding current of the TRIAC dimmer410. For example, V_(A) represents the holding current as detected bythe process. In yet another embodiment, the system controller 480 sets athreshold magnitude V_(B) for the voltage 426. For example, V_(B) islarger than V_(A). In another example, V_(B)=V_(A)+ΔV₁, where ΔV₁ is apredetermined threshold and is larger than zero. In yet another example,V_(B)=k×V_(A), where k is a constant that is larger than or equal to1.05 but smaller than or equal to 1.3. In yet another example, if thevoltage 426 is approximately equal to V_(B), the current flowing throughthe TRIAC dimmer 410 is larger than the holding current of the TRIACdimmer 410, so long as the voltage 426 remains larger than V_(A). In yetanother example, the system controller 480 stores the thresholdmagnitude V_(B).

As shown in FIG. 6, after time t_(s), the processing component 494 isconfigured to use the threshold magnitude V_(B) to perform theclosed-loop control to control the voltage 426 by controlling thecurrent 432 according to some embodiments. For example, time t_(s) isthe beginning of the next half cycle of the AC input voltage 414. Inanother example, the voltage 426 represents the current that flowsthrough the TRIAC dimmer 410, so the system controller 480 controls thecurrent flowing through the TRIAC dimmer 410 by controlling the current432 and the voltage 426.

In one embodiment, the processing component 494 receives the voltage424, and based on the received voltage 424, determines that the TRIACdimmer 410 is turned on at time t₄, as shown by the waveform 610. Inresponse, the signal 436 generated by the system controller 480 becomesa modulation signal (e.g., a pulse-width-modulation signal) at time t₄,changing between a logic high level and a logic low level according toanother embodiment, as shown by the waveform 630. For example, thesignal 436 remains at the logic low level from time t₁ to time t₄. Inanother example, the signal 436 is a modulation signal (e.g., apulse-width-modulation signal) from time t₄ to time t₇. In yet anotherexample, the pulse-width-modulation signal 436 has a pulse width thatcorresponds to the dimming control as reflected by the time durationfrom time t₁ to time t_(s).

In yet another embodiment, the signal 434 generated by the systemcontroller 480 remains at the logic high level from time t₃ to time t₅,and time t₅ follows time t₄. For example, at time t₅, the signal 434changes from the logic high level to the logic low level. In anotherexample, from time t₄ to time t₅, the current 432 increases with timeand reaches a maximum magnitude at time t₅. In yet another example, attime t₅, the current 460 also reaches a maximum magnitude and thevoltage 426 reaches a corresponding maximum magnitude at time t₅, asshown by the waveform 640. In yet another example, the maximum magnitudeof the current 460 is high than the holding current of the TRIAC dimmer410, so that the TRIAC dimmer 410 remains to be turned on at time t₅.

In yet another embodiment, from time t₅ and time t₆, the signal 434remains at the logic low level. For example, from time t₅ and time t₆,the voltage 426 becomes smaller than the corresponding maximum magnitudethat the voltage 426 reaches at time t₅. In another example, at time t₆,the voltage 426 becomes smaller than V_(B)+ΔV₂, even though the voltage426 is still larger than V_(B), where V_(B) represents the thresholdmagnitude that is stored by the system controller 480, and ΔV₂represents a predetermined threshold that is larger than zero. In yetanother example, at time t₆, in response to the voltage 426 becomingbecomes smaller than V_(B)+ΔV₂, even though still larger than thethreshold magnitude V_(B), the signal 434 generated by the systemcontroller 480 becomes a modulation signal at time t₆, changing betweena logic high level and a logic low level, as shown by the waveform 620.

According to one embodiment, the signal 434 is a modulation signal fromtime t₆ to time t₇. For example, from time t₆ to time t₇, the signal 434as a modulation signal regulates the voltage 426 at the thresholdmagnitude V_(B), and the voltage 426 becomes approximately equal to thethreshold magnitude V_(B) by a closed-loop regulation, so that thevoltage 426 remains larger than the magnitude V_(A) of the voltage 426from time t₆ to time t₇, where the magnitude V_(A) of the voltage 426corresponds to the holding current of the TRIAC dimmer 410.

In another example, from time t₆ to time t₇, the current flowing throughthe TRIAC dimmer 410 remains larger than the holding current of theTRIAC dimmer 410, so that the TRIAC dimmer 410 is not turned off by theinsufficient current flowing through the TRIAC dimmer 410.

According to another embodiment, time t₇ is the end of the half cycle ofthe AC input voltage 414 that starts at time t_(s), and time t₇ is alsothe beginning of another half cycle of the AC input voltage 414. Forexample, as shown by the waveform 610, the voltage 424 becomes zero attime t₇ and remains to be zero until the TRIAC dimmer 410 is turned on.In another example, as shown by the waveform 620, the signal 434 is atthe logic high level at time t₇, and remains at the logic high leveluntil sometime after the TRIAC dimmer 410 is turned on. In yet anotherexample, as shown by the waveform 630, the signal 436 is at the logiclow level at time t₇, and remains at the logic low level until the TRIACdimmer 410 is turned on. In yet another example, as shown by thewaveform 640, the voltage 426 decreases to zero soon after time t₇, andremains to be zero until the TRIAC dimmer 410 is turned on.

As discussed above and further emphasized here, FIG. 6 is merely anexample, which should not unduly limit the scope of the claims. One ofordinary skill in the art would recognize many variations, alternatives,and modifications. For example, the waveforms 610, 620, 630 and 640 arechanged if the TRIAC dimmer 410 is includes in the lighting system 400and the TRIAC dimmer 410 is a trailing-edge TRIAC dimmer, instead of aleading-edge TRIAC dimmer 410. In another example, the waveforms 610,620, 630 and 640 are changed if the TRIAC dimmer 410 is not included inthe lighting system 400. In yet another example, FIG. 6 is used todescribe certain operations of FIG. 8. In yet another example, FIG. 6 isused to describe certain operations of FIG. 9.

As shown in FIG. 4, the processing component 496 is configured toprocess the voltage 424 that has waveforms not symmetric between apositive half cycle and a negative half cycle of the AC input voltage414, so that the system controller 480 can provide to the one or moreLEDs 450 a current that is symmetric between the positive half cycle andthe negative half cycle of the AC input voltage 414 according to someembodiments.

FIG. 7 shows certain timing diagrams for the processing component 496 ofthe system controller 480 as part of the lighting system 400 as shown inFIG. 4 if the TRIAC dimmer 410 is includes in the lighting system 400and the TRIAC dimmer 410 is a leading-edge TRIAC dimmer 410 according toan embodiment of the present invention. These diagrams are merelyexamples, which should not unduly limit the scope of the claims. One ofordinary skill in the art would recognize many variations, alternatives,and modifications. According to some embodiments, the waveform 710represents the voltage 424 as a function of time, the waveform 720represents the signal 436 as a function of time, and the waveform 730represents the current that flows through the one or more LEDs 450 as afunction of time. According to certain embodiments, the processingcomponent 496 is configured to work with the processing component 494,wherein the processing component 494 uses the closed-loop control tocontrol the current 432 and the processing component 496 processes thevoltage 424 that has waveforms not symmetric between a positive halfcycle and a negative half cycle of the AC input voltage 414.

In one embodiment, the processing component 494 receives the voltage424, and based on the received voltage 424, determines that the TRIACdimmer 410 is turned on at time t₄, as shown by the waveform 710. Inresponse, the signal 436 generated by the system controller 480 becomesa modulation signal (e.g., a pulse-width-modulation signal) at time t₄,changing between a logic high level and a logic low level according toanother embodiment, as shown by the waveform 720. For example, thesignal 436 is at the logic low level before time t₄. In another example,the signal 436 is a modulation signal (e.g., a pulse-width-modulationsignal) from time t₄ to time t₇. In yet another embodiment, time t₇ isthe end of the half cycle of the AC input voltage 414, during which thevoltage 426 has a pulse width of T_(a) from time t₄ to time t₇. Forexample, time t₇ is also the beginning of another half cycle of the ACinput voltage 414, during which the voltage 426 has a pulse width ofT_(b) from time t₈ to time t₁₀. In another example, the pulse width ofT_(b) is larger than the pulse width of T_(a).

According to one embodiment, the processing component 494 detects thepulse width of T_(a) and the pulse width of T_(b), which correspond totwo successive half cycles of the AC input voltage 414, and theprocessing component 494 also determines that the pulse width of T_(b)is larger than the pulse width of T_(a). For example, the processingcomponent 494 detects the pulse width T_(b) during the half cycle of theAC input voltage 414 that ends at time t_(s), and detects the pulsewidth T_(a) during the half cycle of the AC input voltage 414 thatstarts at time t_(s).

According to another embodiment, the processing component 494 receivesthe voltage 424, and determines that the TRIAC dimmer 410 is turned onat time t₈ with the pulse width of T_(b) for the voltage 424 as shown bythe waveform 710. In response, the system controller 480, for example,keeps the signal 436 at the logic level from time t₈ to time t₉; then,at time t₉, the signal 436 becomes a modulation signal (e.g., apulse-width-modulation signal) that changes between a logic high leveland a logic low level as shown by the waveform 720. In another example,the signal 436 is a modulation signal (e.g., a pulse-width-modulationsignal) from time t₉ to time t₁₀. In yet another example, the timeduration from time t₉ to time t₁₀ is equal to the pulse width of T_(a),the same as the time duration from time t₄ to time t₇.

According to yet another embodiment, time t₁₀ is the end of the halfcycle of the AC input voltage 414, during which the voltage 426 has apulse width of T_(b) from time t₈ to time t₁₀. For example, time t₁₀ isalso the beginning of another half cycle of the AC input voltage 414,during which the voltage 426 has a pulse width of T_(a) from time t₁₁ totime t₁₂. In response, for example, the signal 436 generated by thesystem controller 480, at time t₁₁, becomes a modulation signal (e.g., apulse-width-modulation signal) that changes between a logic high leveland a logic low level as shown by the waveform 720. In another example,the signal 436 is a modulation signal (e.g., a pulse-width-modulationsignal) from time t₁₁ to time t₁₂. In yet another example, the timeduration from time t₁₁ to time t₁₂ is equal to the pulse width of T_(a),the same as the time duration from time t₉ to time t₁₀.

According to yet another embodiment, the processing component 494receives the voltage 424, and determines that the TRIAC dimmer 410 isturned on at time t₁₃ with the pulse width of T_(b) for the voltage 424as shown by the waveform 710. In response, the system controller 480,for example, keeps the signal 436 at the logic level from time t₁₃ totime t₁₄; then, at time t₁₄, the signal 436 becomes a modulation signal(e.g., a pulse-width-modulation signal) that changes between a logichigh level and a logic low level as shown by the waveform 720. Inanother example, the signal 436 is a modulation signal (e.g., apulse-width-modulation signal) from time t₁₄ to time t₁₅. In yet anotherexample, the time duration from time t₁₄ to time t₁₅ is equal to thepulse width of T_(a), the same as the time duration from time t₉ to timet₁₀. According to yet another embodiment, time t₁₅ is the end of thehalf cycle of the AC input voltage 414, during which the voltage 426 hasa pulse width of T_(b) from time t₁₃ to time t₁₅. For example, time t₁₅is also the beginning of another half cycle of the AC input voltage 414,during which the voltage 426 has a pulse width of T_(a).

As shown in FIG. 7, even though the pulse width of the voltage 424 isequal to T_(a) in the half cycle I of the AC input voltage 414, is equalto T_(b) in the half cycle II of the AC input voltage 414, is equal toT_(a) in the half cycle III of the AC input voltage 414, and is equal toT_(b) in the half cycle IV of the AC input voltage 414, the signal 436is a modulation signal (e.g., a pulse-width-modulation signal) for atime duration equal to the pulse width of T_(a) in each of the halfcycle I of the AC input voltage 414, the half cycle II of the AC inputvoltage 414, the half cycle III of the AC input voltage 414, and thehalf cycle IV of the AC input voltage 414, according to certainembodiments. For example, the pulse width of T_(b) is larger than thepulse width of T_(a). In another example, as shown by the waveform 710,the pulse width of the voltage 424 changes from one half cycle of the ACinput voltage 414 to another half cycle I of the AC input voltage 414,but the current that flows through the one or more LEDs 450 remainsperiodic as shown by the waveform 730. In yet another example, thewaveform for the current that flows through the one or more LEDs 450changes in the same way during the time period A (e.g., from time t₄ totime t₉), the time period B (e.g., from time t₉ to time t₁₁), and thetime period C (e.g., from time t₁₁ to time t₁₃). In yet another example,the waveform for the current that flows through the one or more LEDs 450is symmetric between a positive half cycle and a negative half cycle ofthe AC input voltage 414 (e.g., between the half cycle II and the halfcycle III as shown in FIG. 7).

FIG. 8 is a simplified diagram of a lighting system that includesmultiple lamp subsystems according to an embodiment of the presentinvention. This diagram is merely an example, which should not undulylimit the scope of the claims. One of ordinary skill in the art wouldrecognize many variations, alternatives, and modifications. The lightingsystem 800 includes a TRIAC dimmer 410, a rectifier 420, and multiplelamp subsystems 810 ₁, 810 ₂, . . . 810 i, . . . and 810 _(N), wherein Nis an integer that is larger than 1, and i is an integer that is largerthan or equal to 1 and is smaller than or equal to N.

In one embodiment, each of the multiple lamp subsystems includes acurrent sink (e.g., a current sink 430), an LED driver (e.g., an LEDdriver 440), one or more LEDs (e.g., one or more LEDs 450), resistors(e.g., resistors 470, 472, 474, 476, and 478), and a system controller(e.g., a system controller 480). For example, the system controller(e.g., the system controller 480) of each of the multiple lampsubsystems includes terminals (e.g., terminals 482, 484, 486, and 488),and processing components (e.g., processing components 492, 494, and496). In another embodiment, the lamp subsystem 810 _(i) includes acurrent sink 430 _(i), an LED driver 440 _(i), one or more LEDs 450_(i), resistors 470 _(i), 472 _(i), 474 _(i), 476 _(i), and 478 _(i),and a system controller 480 _(i).

As shown in FIG. 8, the TRIAC dimmer 410 receives an AC input voltage414 (e.g., V_(line)) and generates a voltage 412. For example, thevoltage 412 is received by the rectifier 420 (e.g., a full waverectifying bridge), which generates a rectified output voltage 422 and arectified output current 460. In another example, the rectified outputvoltage 422 is received by a voltage divider including the resistors 470_(i) and 472 _(i), and the voltage divider outputs a voltage 424 _(i).

For example, the system controller 480 _(i) includes terminals 482 _(i),484 _(i), 486 _(i), and 488 _(i), and processing components 492 _(i),494 _(i), and 496 _(i). In another example, the terminal 484 _(i) (e.g.,the terminal “I_DET”) receives a voltage 426 _(i). In yet anotherexample, the terminal 486 _(i) (e.g., the terminal “BL”) outputs acontrol signal 434 _(i) (e.g., a pulse-width-modulation signal or ananalog voltage signal) to the current sink 430 _(i) to control a current432 _(i). In yet another example, the terminal 488 _(i) (e.g., theterminal “DIM”) outputs a control signal 436 _(i) (e.g., apulse-width-modulation signal or an analog voltage signal) to the LEDdriver 440 _(i). In yet another example, the current 432 _(i) is smallerthan or equal to a current 820 _(i) that flows into the lamp subsystem810 _(i).

In yet another embodiment, the rectified output current 460 is equal tothe current flowing through the TRIAC dimmer 410, and is also equal tothe sum of a current 820 ₁, a current 820 ₂, . . . , a current 820 _(i),. . . and a current 820 _(N). For example, the current 820 ₁, thecurrent 820 ₂, . . . , the current 820 _(i), . . . and the current 820_(N) are currents that flow into the lamp subsystems 810 ₁, 810 ₂, . . .810 _(i), . . . and 810 _(N), respectively. In another example, thecurrent 820 ₁, the current 820 ₂, . . . , the current 820 _(i), . . .and the current 820 _(N) each are a component of the rectified outputcurrent 460, and each represent a component of the current flowingthrough the TRIAC dimmer 410. In yet another example, the voltage 426_(i) represents the current 820 _(i), and also represents a component ofthe current flowing through the TRIAC dimmer 410.

In yet another embodiment, the current 820 _(i) is divided into acurrent 462 _(i) received by the resistor 470 _(i), the current 432 _(i)generated and received by the current sink 430 _(i), and a current 442_(i) received by the LED driver 440 _(i). For example, the current 820_(i) is equal to the sum of the current 462 _(i), the current 432 _(i),and the current 442 _(i).

According to one embodiment, after the processing component 492 _(i) hasdetected that the TRIAC dimmer 410 is included in the lighting system800, and after the processing component 492 _(i) has also determinedwhether the TRIAC dimmer 410 is a leading-edge TRIAC dimmer or atrailing-edge TRIAC dimmer, the processing component 494 _(i) of thelamp subsystem 810 _(i) uses the closed-loop control to control thecurrent 432 _(i). For example, the multiple lamp subsystems 810 ₁, 810₂, . . . 810 _(i), . . . and 810 _(N) together satisfy the followingequation:

$\begin{matrix}{I_{holding} < {\sum\limits_{i = 1}^{N}\; I_{i}} < {I_{holding} \times N}} & \left( {{Equation}\mspace{14mu} 1} \right)\end{matrix}$wherein I_(holding) represents the magnitude of the holding current ofthe TRIAC dimmer 410, and I_(i) represents the magnitude of the current820 _(i). N is an integer that is larger than 1, and i is an integerthat is larger than or equal to 1 and is smaller than or equal to N.

As discussed above and further emphasized here, FIG. 6 is merely anexample, which should not unduly limit the scope of the claims. One ofordinary skill in the art would recognize many variations, alternatives,and modifications. For example, FIG. 6 is used to describe certainoperations of FIG. 8.

According to some embodiments, the waveform 610 represents the voltage424 _(i) as a function of time, the waveform 620 represents the signal434 _(i) as a function of time, the waveform 630 represents the signal436 _(i) as a function of time, and the waveform 640 represents thevoltage 426 _(i) as a function of time. According to certainembodiments, all of the processing components 494 _(i) are configured todetect the holding current of the TRIAC dimmer 410 before time t_(s),and each use the closed-loop control to control the current 432 _(i)after time t_(s).

In one embodiment, the processing component 494 _(i) receives thevoltage 424 _(i), and based on the received voltage 424 _(i), determinesthat the TRIAC dimmer 410 is turned on at time t₁, as shown by thewaveform 610. In response, after time t₁, the system controller 480_(i), including the processing component 494 _(i), generates the signal434 _(i) so that the signal 434 _(i) is at the maximum duty cycleimmediately after time t₁, but the duty cycle of the signal 434 _(i)then decreases with time from the maximum duty cycle, according to someembodiments. For example, if the signal 434 _(i) is at the maximum dutycycle, the current 432 _(i) reaches a maximum magnitude.

In another example, if all of the currents 432 _(i), where i is aninteger that is larger than or equal to 1 and is smaller than or equalto N, each reach a maximum magnitude, all of the voltages 426 _(i) eachreach a corresponding maximum magnitude at time t₂ as shown by thewaveform 640, and the current 460 also reaches a maximum magnitude. Inyet another example, the maximum magnitude of the current 460 is highthan the holding current of the TRIAC dimmer 410, so that the TRIACdimmer 410 remains to be turned on at time t₂.

In yet another embodiment, if the duty cycle of the signal 434 _(i)decreases with time from the maximum duty cycle as shown by the waveform610, the voltage 426 _(i), which represents the current 820 _(i), alsodecreases with time from the maximum magnitude as shown by the waveform640. For example, if all of the currents 820 _(i), where i is an integerthat is larger than or equal to 1 and is smaller than or equal to N,each decrease with time from the maximum magnitude, the current 460 alsodecreases with time from its maximum magnitude. In another example, thecurrent 460, which is equal to the current flowing through the TRIACdimmer 410, becomes smaller than the holding current of the TRIAC dimmer410, the TRIAC dimmer 410 is turned off. In yet another example, inresponse to the TRIAC dimmer 410 being turned off, the decrease of thevoltage 424 _(i) becomes steeper at time t₃ as shown by the waveform 610and the decrease of the voltage 426 _(i) also becomes steeper at time t₃as shown by the waveform 640.

In yet another embodiment, the magnitude V_(A) of the voltage 426 _(i)at time t₃ corresponds to one component of multiple components of theholding current of the TRIAC dimmer 410. For example, if all of thevoltages 426 _(i) each are equal to their corresponding magnitudesV_(A), the current 460 is equal to the holding current of the TRIACdimmer 410.

In yet another embodiment, the system controller 480 _(i) sets athreshold magnitude V_(B) for the voltage 426 _(i). For example, V_(B)is larger than V_(A). In another example, V_(B)=V_(A)+ΔV₁, where ΔV₁ isa predetermined threshold and is larger than zero. In yet anotherexample, V_(B)=k×V_(A), where k is a constant that is larger than orequal to 1.05 but smaller than or equal to 1.3. In yet another example,if all of the voltages 426 _(i) each are approximately equal to theircorresponding V_(B), the current flowing through the TRIAC dimmer 410 islarger than the holding current of the TRIAC dimmer 410, so long as thevoltage 426 _(i) remains larger than V_(A). In yet another example, thesystem controller 480 _(i) stores the corresponding threshold magnitudeV_(B).

As shown in FIG. 6, after time t_(s), the processing component 494 _(i)is configured to use the threshold magnitude V_(B) to perform theclosed-loop control to control the voltage 426 _(i) by controlling thecurrent 432 _(i) according to some embodiments. For example, time t_(s)is the beginning of the next half cycle of the AC input voltage 414. Inanother example, the voltage 426 _(i) represents the current 820 _(i),and sum of all of the currents 820 _(i) is equal to the current thatflows through the TRIAC dimmer 410, so all of the system controllers 480_(i) together can control the current flowing through the TRIAC dimmer410 by each controlling the current 432 _(i) and the voltage 426 _(i).

In one embodiment, the processing component 494 _(i) receives thevoltage 424 _(i), and based on the received voltage 424 _(i), determinesthat the TRIAC dimmer 410 is turned on at time t₄, as shown by thewaveform 610. In response, the signal 436 _(i) generated by the systemcontroller 480 _(i) becomes a modulation signal (e.g., apulse-width-modulation signal) at time t₄, changing between a logic highlevel and a logic low level according to another embodiment, as shown bythe waveform 630. For example, the signal 436 _(i) remains at the logiclow level from time t₁ to time t₄. In another example, the signal 436_(i) is a modulation signal (e.g., a pulse-width-modulation signal) fromtime t₄ to time t₇. In yet another example, the pulse-width-modulationsignal 436 _(i) has a pulse width that corresponds to the dimmingcontrol as reflected by the time duration from time t₁ to time t₅.

In yet another embodiment, the signal 434 _(i) generated by the systemcontroller 480 _(i) remains at the logic high level from time t₃ to timet₅, and time t₅ follows time t₄. For example, at time t₅, the signal 434_(i) changes from the logic high level to the logic low level. Inanother example, from time t₄ to time t₅, the current 432 _(i) increaseswith time and reaches a maximum magnitude at time t₅, so the voltage 426_(i) reaches a corresponding maximum magnitude at time t₅, as shown bythe waveform 640. In yet another example, at time t₅, all of thecurrents 820 _(i) each reach their corresponding maximum magnitudes, sothe current 460 also reaches a maximum magnitude. In yet anotherexample, the maximum magnitude of the current 460 is high than theholding current of the TRIAC dimmer 410, so that the TRIAC dimmer 410remains to be turned on at time t₅.

In yet another embodiment, from time t₅ and time t₆, the signal 434 _(i)remains at the logic low level. For example, from time t₅ and time t₆,the voltage 426 _(i) becomes smaller than the corresponding maximummagnitude that the voltage 426 _(i) reaches at time t₅. In anotherexample, at time t₆, the voltage 426 _(i) becomes smaller thanV_(B)+ΔV₂, even though the voltage 426 _(i) is still larger than V_(B),where V_(B) represents the threshold magnitude that is stored by thesystem controller 480 _(i), and ΔV₂ represents a predetermined thresholdthat is larger than zero. In yet another example, at time t₆, inresponse to the voltage 426 _(i) becoming smaller than V_(B)+ΔV₂, eventhough still larger than the threshold magnitude V_(B), the signal 434_(i) generated by the system controller 480 _(i) becomes a modulationsignal at time t₆, changing between a logic high level and a logic lowlevel, as shown by the waveform 620.

According to one embodiment, the signal 434 _(i) is a modulation signalfrom time t₆ to time t₇. For example, from time t₆ to time t₇, thevoltage 426 _(i) remains larger than or approximately equal to thethreshold magnitude V_(B) by a closed-loop regulation, so that thevoltage 426 _(i) remains larger than the magnitude V_(A) of the voltage426 _(i) from time t₆ to time t₇, where the magnitude V_(A) of thevoltage 426 _(i) corresponds to the holding current of the TRIAC dimmer410. In another example, from time t₆ to time t₇, the current flowingthrough the TRIAC dimmer 410 remains larger than the holding current ofthe TRIAC dimmer 410, so that the TRIAC dimmer 410 is not turned off bythe insufficient current flowing through the TRIAC dimmer 410.

According to another embodiment, time t₇ is the end of the half cycle ofthe AC input voltage 414 that starts at time t₅, and time t₇ is also thebeginning of another half cycle of the AC input voltage 414. Forexample, as shown by the waveform 610, the voltage 424 _(i) becomes zeroat time t₇ and remains to be zero until the TRIAC dimmer 410 is turnedon. In another example, as shown by the waveform 620, the signal 434_(i) is at the logic high level at time t₇, and remains at the logichigh level until sometime after the TRIAC dimmer 410 is turned on. Inyet another example, as shown by the waveform 630, the signal 436 _(i)is at the logic low level at time t₇, and remains at the logic low leveluntil the TRIAC dimmer 410 is turned on. In yet another example, asshown by the waveform 640, the voltage 426 _(i) decreases to zero soonafter time t₇, and remains to be zero until the TRIAC dimmer 410 isturned on.

FIG. 9 is a simplified diagram of a lighting system that includesmultiple lamp subsystems according to another embodiment of the presentinvention. This diagram is merely an example, which should not undulylimit the scope of the claims. One of ordinary skill in the art wouldrecognize many variations, alternatives, and modifications. The lightingsystem 900 includes a TRIAC dimmer 410 and multiple lamp subsystems 910₁, 910 ₂, . . . 910 _(i), . . . and 910 _(N), wherein N is an integerthat is larger than 1, and i is an integer that is larger than or equalto 1 and is smaller than or equal to N.

In one embodiment, each of the multiple lamp subsystems includes arectifier (e.g., a rectifier 420), a current sink (e.g., a current sink430), an LED driver (e.g., an LED driver 440), one or more LEDs (e.g.,one or more LEDs 450), resistors (e.g., resistors 470, 472, 474, 476,and 478), and a system controller (e.g., a system controller 480). Forexample, the system controller (e.g., the system controller 480) of eachof the multiple lamp subsystems includes terminals (e.g., terminals 482,484, 486, and 488), and processing components (e.g., processingcomponents 492, 494, 496, and 498). In another embodiment, the lampsubsystem 910 _(i) includes a rectifier 420 _(i), a current sink 430_(i), an LED driver 440 _(i), one or more LEDs 450 _(i), resistors 470_(i), 472 _(i), 474 _(i), 476 _(i), and 478 _(i), and a systemcontroller 480 _(i). For example, the system controller 480 _(i)includes terminals 482 _(i), 484 _(i), 486 _(i), and 488 _(i), andprocessing components 492 _(i), 494 _(i), 496 _(i), and 498 _(i). Inanother example, the system controller 480 _(i) outputs a signal 434_(i) to the current sink 430 _(i) to control the current 432 _(i). Inyet another example, the current 432 _(i) is smaller than or equal to acurrent 920 _(i) that flows into the lamp subsystem 910 _(i). In yetanother embodiment, a current 960 is equal to the current flowingthrough the TRIAC dimmer 410, and is also equal to the sum of a current920 ₁, a current 920 ₂, . . . , a current 920 _(i), . . . and a current920 _(N). For example, the currents 920 ₁, 920 ₂, . . . , 920 _(i), . .. and 920 _(N) are currents that flow into the lamp subsystems 910 ₁,910 ₂, . . . 910 _(i), . . . and 910 _(N), respectively.

According to one embodiment, after the processing component 492 _(i) hasdetected that the TRIAC dimmer 410 is included in the lighting system900, and after the processing component 492 _(i) has also determinedwhether the TRIAC dimmer 410 is a leading-edge TRIAC dimmer or atrailing-edge TRIAC dimmer, the processing component 498 _(i) isconfigured to work with the processing component 494 _(i) of the samelamp subsystem 910 _(i) and with the processing components 498 _(j) ofeach of the other lamp subsystems 910 _(j) to detect the holding currentof the TRIAC dimmer 410, and use the closed-loop control to control thecurrent 432 _(i), wherein j is an integer that is larger than or equalto 1 and is smaller than or equal to N, and j is not equal to i. Forexample, the multiple lamp subsystems 910 ₁, 910 ₂, . . . 910 _(i), . .. and 910 _(N) work together, and satisfy the following equation:

$\begin{matrix}{I_{holding} < {\sum\limits_{i = 1}^{N}\; I_{i}} < {I_{holding} \times N}} & \left( {{Equation}\mspace{14mu} 2} \right)\end{matrix}$wherein I_(holding) represents the magnitude of the holding current ofthe TRIAC dimmer 410, and I_(i) represents the magnitude of the current920 _(i). N is an integer that is larger than 1, and i is an integerthat is larger than or equal to 1 and is smaller than or equal to N.

According to certain embodiments, systems and methods are provided forintelligent control related to TRIAC dimmers. For example, the systemsand methods can intelligently detect the type of a TRIAC dimmer. Inanother example, the type of the TRIAC dimmer can be a leading-edgeTRIAC dimmer, a trailing-edge TRIAC dimmer, or the situation that noTRIAC dimmer is included in the lighting system. In yet another example,the detection of the type of a TRIAC dimmer takes into account athreshold voltage as well as rate of voltage change. In yet anotherexample, the systems and methods also provide intelligent control thatmatches with the detected type of the TRIAC dimmer.

According to some embodiments of the present invention, systems andmethods can provide intelligent detection of the type of a TRIAC dimmerand also provide dimming control without causing one or more LEDs toflicker. For example, the systems and methods are configured to detectwhether or not a TRIAC dimmer is included in the lighting system, and ifthe TRIAC dimmer is detected to be included in the lighting system,whether the TRIAC dimmer is a leading-edge TRIAC dimmer or atrailing-edge TRIAC dimmer. In another example, the systems and methodsare further configured to detect the holding current of the TRIACdimmer, and use the closed-loop control so that the current flowingthrough the TRIAC dimmer exceeds, but does not exceed too much, theholding current of the TRIAC dimmer in order to reduce flickering of theone or more LEDs and also to improve efficiency of the lighting system.In yet another example, the systems and methods are further configuredto process a voltage that has waveforms not symmetric between a positivehalf cycle and a negative half cycle of an AC input voltage in order toprovide to one or more LEDs a current that is symmetric between thepositive half cycle and the negative half cycle of the AC input voltage414. In yet another example, the systems and methods are furtherconfigured to, if the lighting system includes multiple lamp subsystems,control the current flowing through the TRIAC dimmer so that thiscurrent exceeds, but does not exceed too much, the holding current ofthe TRIAC dimmer in order to reduce flickering of the one or more LEDsand also to improve efficiency of the lighting system.

According to another embodiment, a system controller for a lightingsystem includes a first controller terminal configured to receive afirst signal, and a second controller terminal configured to output asecond signal to a diver component. The driver component is configuredto receive a first current and provide one or more drive currents to oneor more light emitting diodes in response to the second signal.Additionally, the system controller is configured to process informationassociated with the first signal, determine a first time period for thefirst signal to increase from a first threshold to a second threshold,and determine a second time period for the first signal to decrease fromthe second threshold to the first threshold. Moreover, the systemcontroller is further configured to, in response to the second timeperiod minus the first time period being larger than a predeterminedpositive value, determine the first signal to be associate with aleading-edge TRIAC dimmer, and in response to the first time periodminus the second time period being larger than the predeterminedpositive value, determine the first signal to be associate with atrailing-edge TRIAC dimmer. Also, the system controller is furtherconfigured to, in response to an absolute value of the first time periodminus the second time period being smaller than the predeterminedpositive value, determine the first signal not to be associated with anyTRIAC dimmer. For example, the system controller is implementedaccording to at least FIG. 4, FIG. 5, FIG. 8, and/or FIG. 9.

According to another embodiment, a system controller for a lightingsystem includes a first controller terminal configured to receive afirst signal associated with a TRIAC dimmer, and a second controllerterminal configured to output a second signal to a current sink. Thecurrent sink is configured to receive a first current in response to thesecond signal. Additionally, the system controller includes a thirdcontroller terminal configured to output a third signal to a drivercomponent. The driver component is configured to receive a secondcurrent and provide one or more drive currents to one or more lightemitting diodes in response to the third signal. Moreover, the systemcontroller includes a fourth controller terminal configured to receive afourth signal. The fourth signal is related to a third current thatflows through the TRIAC dimmer. Also, the system controller isconfigured to process information associated with the first signal, anddetermine the TRIAC dimmer is turned on at a first time based at leastin part on the first signal. Additionally, the system controller isconfigured to, after the first time, with a first delay, decrease a dutycycle of the second signal from a first predetermined value until thefourth signal indicates that the TRIAC dimmer is turned off at a secondtime, and in response to the fourth signal indicating that the TRIACdimmer is turned off at the second time, set a first threshold for thefourth signal, the first threshold being related to a holding current ofthe TRIAC dimmer. Moreover, the system controller is further configuredto process information associated with the first signal, and determinethe TRIAC dimmer is turned on at a third time based at least in part onthe first signal. Also, the system controller is further configured to,after the third time, with a second delay, change the second signal froma first logic level to a second logic level and keep the second signalat the second logic level until a fourth time, and at the fourth time,change the second signal to a modulation signal to regulate the fourthsignal at a second threshold in order to keep the fourth signal largerthan the first threshold and keep the third current larger than theholding current of the TRIAC dimmer. The second threshold is larger thanthe first threshold, and the modulation signal changes between the firstlogic level and the second logic level. For example, the systemcontroller is implemented according to at least FIG. 4, FIG. 6, FIG. 8,and/or FIG. 9.

According to yet another embodiment, a method for a lighting systemincludes receiving a first signal, processing information associatedwith the first signal, determining a first time period for the firstsignal to increase from a first threshold to a second threshold,determining a second time period for the first signal to decrease fromthe second threshold to the first threshold, and processing informationassociated with the first time period and the second time period.Additionally, the method includes, in response to the second time periodminus the first time period being larger than a predetermined positivevalue, determining the first signal to be associate with a leading-edgeTRIAC dimmer, and in response to the first time period minus the secondtime period being larger than the predetermined positive value,determining the first signal to be associate with a trailing-edge TRIACdimmer. Moreover, the method includes, in response to an absolute valueof the first time period minus the second time period being smaller thanthe predetermined positive value, determining the first signal not to beassociated with any TRIAC dimmer. For example, the method is implementedaccording to at least FIG. 4, FIG. 5, FIG. 8, and/or FIG. 9.

According to yet another embodiment, a method for a lighting systemincludes receiving a first signal associated with a TRIAC dimmer,receiving a second signal related to a first current that flows throughthe TRIAC dimmer, processing information associated with the firstsignal, and determining the TRIAC dimmer is turned on at a first timebased at least in part on the first signal. Additionally, the methodincludes, after the first time, with a first delay, decreasing a dutycycle of a third signal from a first predetermined value until thesecond signal indicates that the TRIAC dimmer is turned off at a secondtime, and setting a first threshold for the second signal in response tothe second signal indicating that the TRIAC dimmer is turned off at thesecond time, the first threshold being related to a holding current ofthe TRIAC dimmer. Moreover, the method includes determining that theTRIAC dimmer is turned on at a third time based at least in part on thefirst signal, and after the third time, with a second delay, changingthe third signal from a first logic level to a second logic level andkeep the third signal at the second logic level until a fourth time.Also, the method includes at the fourth time, changing the third signalto a modulation signal to regulate the second signal at a secondthreshold in order to keep the second signal larger than the firstthreshold and keep the first current larger than the holding current ofthe TRIAC dimmer. The second threshold is larger than the firstthreshold, and the modulation signal changes between the first logiclevel and the second logic level. For example, the method is implementedaccording to at least FIG. 4, FIG. 6, FIG. 8, and/or FIG. 9.

For example, some or all components of various embodiments of thepresent invention each are, individually and/or in combination with atleast another component, implemented using one or more softwarecomponents, one or more hardware components, and/or one or morecombinations of software and hardware components. In another example,some or all components of various embodiments of the present inventioneach are, individually and/or in combination with at least anothercomponent, implemented in one or more circuits, such as one or moreanalog circuits and/or one or more digital circuits. In yet anotherexample, various embodiments and/or examples of the present inventioncan be combined.

Although specific embodiments of the present invention have beendescribed, it will be understood by those of skill in the art that thereare other embodiments that are equivalent to the described embodiments.Accordingly, it is to be understood that the invention is not to belimited by the specific illustrated embodiments, but only by the scopeof the appended claims.

What is claimed is:
 1. A system controller for a lighting system, thesystem controller comprising: a first controller terminal configured toreceive a first signal; a second controller terminal configured tooutput a second signal to a current sink, the current sink beingconfigured to receive a first current in response to the second signal;and a third controller terminal configured to receive a third signal,the third signal being related to a second current that flows through aleading-edge TRIAC dimmer or a trailing-edge TRIAC dimmer; wherein thesystem controller is configured to: process information associated withthe first signal; determine a first time period for the first signal toincrease from a first threshold to a second threshold; and determine asecond time period for the first signal to decrease from the secondthreshold to the first threshold; wherein the system controller isfurther configured to: in response to the second time period minus thefirst time period being larger than a predetermined positive value,determine the first signal to be associated with the leading-edge TRIACdimmer; in response to the first time period minus the second timeperiod being larger than the predetermined positive value, determine thefirst signal to be associated with the trailing-edge TRIAC dimmer; andin response to an absolute value of the first time period minus thesecond time period being smaller than the predetermined positive value,determine the first signal not to be associated with any TRIAC dimmer.2. The system controller of claim 1 wherein the third signal representsthe second current that flows through the leading-edge TRIAC dimmer orthe trailing-edge TRIAC dimmer.
 3. The system controller of claim 1wherein the third signal represents one component of multiple componentsof the second current that flows through the leading-edge TRIAC dimmeror the trailing-edge TRIAC dimmer.
 4. A system controller for a lightingsystem, the system controller comprising: a first controller terminalconfigured to receive a first signal associated with a TRIAC dimmer; asecond controller terminal configured to output a second signal to adriver, the driver being configured to receive a first current andprovide one or more drive currents to one or more light emitting diodesin response to the second signal; and a third controller terminalconfigured to receive a third signal, the third signal being related toa second current that flows through the TRIAC dimmer; wherein the systemcontroller is configured to: process information associated with thefirst signal; determine the TRIAC dimmer is turned on at a first timebased at least in part on the first signal; after the first time, with afirst delay, decrease a duty cycle of a fourth signal from a firstpredetermined value until the third signal indicates that the TRIACdimmer is turned off at a second time; and in response to the thirdsignal indicating that the TRIAC dimmer is turned off at the secondtime, set a first threshold for the third signal, the first thresholdbeing related to a holding current of the TRIAC dimmer; wherein thesystem controller is further configured to: process informationassociated with the first signal; determine the TRIAC dimmer is turnedon at a third time based at least in part on the first signal; after thethird time, with a second delay, change the fourth signal from a firstlogic level to a second logic level and keep the fourth signal at thesecond logic level until a fourth time; and at the fourth time, changethe fourth signal to a modulation signal to regulate the third signal ata second threshold in order to keep the third signal larger than thefirst threshold and keep the second current larger than the holdingcurrent of the TRIAC dimmer; wherein: the second threshold is largerthan the first threshold; and the modulation signal changes between thefirst logic level and the second logic level.
 5. The system controllerof claim 4 wherein: the third signal represents the second current thatflows through the TRIAC dimmer; and the first threshold corresponds tothe holding current of the TRIAC dimmer.
 6. The system controller ofclaim 4 wherein: the third signal represents one component of multiplecomponents of the second current that flows through the TRIAC dimmer;and the first threshold corresponds to the one component of the multiplecomponents of the holding current of the TRIAC dimmer.
 7. The systemcontroller of claim 4 is further configured to keep the second signal atthe second logic level from the first time to the third time.
 8. Thesystem controller of claim 7 wherein, in response to the second signalbeing kept at the second logic level from the first time to the thirdtime, the one or more drive currents are equal to zero from the firsttime to the third time; and the first current is also equal to zero fromthe first time to the third time.
 9. The system controller of claim 4wherein: the first logic level is a logic high level; and the secondlogic level is a logic low level.
 10. The system controller of claim 4is further configured to: detect an abrupt change of slope at which thethird signal decreases; and set the first threshold for the third signalbased at least in part on the detected abrupt change of slope.
 11. Thesystem controller of claim 4 wherein: the first signal includes a firstpulse associated with a first input period and a second pulse associatedwith a second input period; and the second signal is associated with afirst modulation period for the first input period and a secondmodulation period for the second input period; wherein the systemcontroller is further configured to: determine the first modulationperiod for the first input period; change the second signal between thefirst logic level and the second logic level at a modulation frequencyduring the first modulation period; determine the second modulationperiod for the second input period; and change the second signal betweenthe first logic level and the second logic level at the modulationfrequency during the second modulation period; wherein: the first pulsecorresponds to a first pulse width; the second pulse corresponds to asecond pulse width; the first modulation period corresponds to a firstduration; and the second modulation period corresponds to a secondduration; wherein: the first pulse width and the second pulse width aredifferent in magnitude; and the first duration and the second durationare equal in magnitude.
 12. The system controller of claim 4 is furtherconfigured to: process information associated with the first signal;determine a first time period for the first signal to increase from athird threshold to a fourth threshold; and determine a second timeperiod for the first signal to decrease from the fourth threshold to thethird threshold; wherein the system controller is further configured to:in response to the second time period minus the first time period beinglarger than a second predetermined value, determine the TRIAC dimmer tobe a first TRIAC dimmer; and in response to the first time period minusthe second time period being larger than the second predetermined value,determine the TRIAC dimmer to be a second TRIAC dimmer; wherein thesecond predetermined value is larger than zero.
 13. The systemcontroller of claim 4 is further configured to: during the first delayfrom the first time to a fifth time, keep the duty cycle of the fourthsignal at the first predetermined value; and at the fifth time, startdecreasing the duty cycle of the fourth signal from the firstpredetermined value; wherein the fifth time is after the first time butbefore the second time.
 14. A method for a lighting system, the methodcomprising: receiving a first signal; processing information associatedwith the first signal; determining a first time period for the firstsignal to increase from a first threshold to a second threshold;determining a second time period for the first signal to decrease fromthe second threshold to the first threshold; processing informationassociated with the first time period and the second time period; inresponse to the second time period minus the first time period beinglarger than a predetermined positive value, determining the first signalto be associated with a leading-edge TRIAC dimmer; in response to thefirst time period minus the second time period being larger than thepredetermined positive value, determining the first signal to beassociated with a trailing-edge TRIAC dimmer; in response to an absolutevalue of the first time period minus the second time period beingsmaller than the predetermined positive value, determining the firstsignal not to be associated with any TRIAC dimmer; and receiving asecond signal; wherein the second signal is related to a current thatflows through the leading-edge TRIAC dimmer or the trailing-edge TRIACdimmer.
 15. The method of claim 14 wherein the second signal representsthe current that flows through the leading-edge TRIAC dimmer or thetrailing-edge TRIAC dimmer.
 16. The method of claim 14 wherein thesecond signal represents one component of multiple components of thecurrent that flows through the leading-edge TRIAC dimmer or thetrailing-edge TRIAC dimmer.
 17. A method for a lighting system, themethod comprising: receiving a first signal associated with a TRIACdimmer, the first signal indicating that the TRIAC dimmer is turned onat a first time; after the first time, with a first delay, decreasing aduty cycle of a second signal from a first predetermined value until athird signal indicates that the TRIAC dimmer is turned off at a secondtime; setting a first threshold for the third signal in response to thethird signal indicating that the TRIAC dimmer is turned off at thesecond time, the first threshold being related to a holding current ofthe TRIAC dimmer; determining that the TRIAC dimmer is turned on at athird time based at least in part on the first signal; after the thirdtime, with a second delay, changing the second signal from a first logiclevel to a second logic level and keep the second signal at the secondlogic level until a fourth time; and at the fourth time, changing thesecond signal to a modulation signal to regulate the third signal at asecond threshold in order to keep the third signal larger than the firstthreshold and keep a first current larger than the holding current ofthe TRIAC dimmer; wherein: the second threshold is larger than the firstthreshold; and the modulation signal changes between the first logiclevel and the second logic level.
 18. The method of claim 17 wherein:the third signal represents the first current that flows through theTRIAC dimmer; and the first threshold corresponds to the holding currentof the TRIAC dimmer.
 19. The method of claim 17 wherein: the thirdsignal represents one component of multiple components of the firstcurrent that flows through the TRIAC dimmer; and the first thresholdcorresponds to the one component of the multiple components of theholding current of the TRIAC dimmer.
 20. The method of claim 17 wherein:the first logic level is a logic high level; and the second logic levelis a logic low level.
 21. The method of claim 17 wherein the setting afirst threshold for the third signal in response to the third signalindicating that the TRIAC dimmer is turned off at the second timeincludes: detecting an abrupt change of slope at which the third signaldecreases; and setting the first threshold for the third signal based atleast in part on the detected abrupt change of slope.
 22. The method ofclaim 17, and further comprising: outputting the second signal; andoutputting a fourth signal; wherein: the first signal includes a firstpulse associated with a first input period and a second pulse associatedwith a second input period; and the fourth signal is associated with afirst modulation period for the first input period and a secondmodulation period for the second input period.
 23. The method of claim22, and further comprising: determining the first modulation period forthe first input period; changing the fourth signal between the firstlogic level and the second logic level at a modulation frequency duringthe first modulation period; determining the second modulation periodfor the second input period; and changing the fourth signal between thefirst logic level and the second logic level at the modulation frequencyduring the second modulation period; wherein: the first pulsecorresponds to a first pulse width; the second pulse corresponds to asecond pulse width; the first modulation period corresponds to a firstduration; and the second modulation period corresponds to a secondduration; wherein: the first pulse width and the second pulse width aredifferent in magnitude; and the first duration and the second durationare equal in magnitude.
 24. The method of claim 17, and furthercomprising: determining a first time period for the first signal toincrease from a third threshold to a fourth threshold; determining asecond time period for the first signal to decrease from the fourththreshold to the third threshold; in response to the second time periodminus the first time period being larger than a second predeterminedvalue, determining the TRIAC dimmer to be a first TRIAC dimmer; and inresponse to the first time period minus the second time period beinglarger than the second predetermined value, determining the TRIAC dimmerto be a second TRIAC dimmer; wherein the second predetermined value islarger than zero.
 25. The method of claim 17, and further comprising:during the first delay from the first time to a fifth time, keep theduty cycle of the second signal at the first predetermined value; and atthe fifth time, start decreasing the duty cycle of the second signalfrom the first predetermined value; wherein the fifth time is after thefirst time but before the second time.